The generator matrix

 1  1
 0 X^2

generates a code of length 2 over Z3[X]/(X^3) who�s minimum homogenous weight is 3.

Homogenous weight enumerator: w(x)=1x^0+4x^3+72x^4+4x^6

The gray image is a linear code over GF(3) with n=18, k=4 and d=9.
As d=11 is an upper bound for linear (18,4,3)-codes, this code is optimal over Z3[X]/(X^3) for dimension 4.
This code was found by Heurico 1.16 in 1.5e-005 seconds.